package com.example.backend.model;

import com.example.backend.mapper.po.AirPo;
import com.example.backend.mapper.po.HumidityPo;
import com.example.backend.mapper.po.TemperaturePo;

public final class CloneFactory {
    public static SensorData copy(SensorData target, TemperaturePo source) {
        target.setTime(source.getTimestamp());
        target.setValue(source.getValue());
        return target;
    }

    public static SensorData copy(SensorData target, HumidityPo source) {
        target.setTime(source.getTimestamp());
        target.setValue(source.getValue());
        return target;
    }

    public static SensorData copy(SensorData target, AirPo source) {
        target.setTime(source.getTimestamp());
        target.setValue(source.getValue());
        return target;
    }
}
